import request from '@/utils/request'

// 查询指标监控列表
export function listPcwRiskMonitor(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/list',
    method: 'get',
    params: query
  })
}

// 根据公司ID，获取所有的关键条款
export function listPcwTerms(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/listPcwTerms',
    method: 'get',
    params: query
  })
}

// 查询指标监控列表
export function dealPcwWarningList(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/dealPcwWarningList',
    method: 'get',
    params: query
  })
}

// 查询指标监控列表
export function dealPcwTermsList(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/dealPcwTermsList',
    method: 'get',
    params: query
  })
}

// 根据指标keyCode获取是否已经存在
export function getByKeyCode(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/getByKeyCode',
    method: 'get',
    params: query
  })
}

// 查询指标监控详情
export function getRiskDetails(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/getRiskDetails',
    method: 'get',
    params: query
  })
}

// 查询指标监控详细
export function getPcwRiskMonitor(id) {
  return request({
    url: '/pcw/pcwRiskMonitor/' + id,
    method: 'get'
  })
}

// 保存指标监控
export function savePcwRiskMonitor(data) {
  return request({
    url: '/pcw/pcwRiskMonitor/save',
    method: 'post',
    data: data
  })
}

// 删除指标监控
export function delPcwRiskMonitor(id) {
  return request({
    url: '/pcw/pcwRiskMonitor/' + id,
    method: 'delete'
  })
}

// 导出指标监控
export function exportPcwRiskMonitor(query) {
  return request({
    url: '/pcw/pcwRiskMonitor/export',
    method: 'get',
    params: query
  })
}
